export default [
  {
    path: '/',
    component: () => import('../views/Home.vue'),
    children: [
      {
        path: 'index',
        component: () => import('../views/Index.vue'),
      },
      {
        path: 'consult',
        children: [
          {
            path: 'text',
            component: () => import('../views/Consult/Text.vue')
          },
          {
            path: 'tel',
            component: () => import('../views/Consult/Tel.vue')
          },
          {
            path: '',
            component: () => import('../views/Consult/Consult.vue'),
          }
        ]
      }, {
        path: 'medicine',
        component: () => import('../views/Medicine.vue'),
      }, {
        path: 'mine',
        component: () => import('../views/Mine/Mine.vue'),
      },
      {
        path: '',
        redirect: "/index",
      }
    ]
  },
  {
    path: '/login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/search',
    component: () => import('../views/Search.vue'),
  },
  {
    path: '/doctor',
    component: () => import('../views//Doctor/Doctor.vue'),
    children: [
      {
        path: 'doctorIndex',
        component: () => import('../views/Doctor/DoctorIndex.vue'),
      },
      {
        path: 'goods',
        component: () => import('../views/Doctor/Goods.vue'),
      },
      {
        path: 'info',
        component: () => import('../views/Doctor/Info.vue'),
      },
      {
        path: 'caseList',
        component: () => import('../views/Doctor/CaseList.vue'),
      },
      {
        path: 'petList',
        component: () => import('../views/Doctor/PetList.vue'),
      },
      {
        path: 'list',
        component: () => import('../views/Doctor/List.vue'),
      },
      {
        path: '',
        component: () => import('../views/Doctor/DoctorIndex.vue'),
      },
    ]
  },
  {
    path: '/shopSearch',
    component: () => import('../views/Shop/ShopSearch.vue'),
  },
  {
    path: '/nbnc',
    component: () => import("../views/Nbnc/Nbnc.vue"),
    children: [
      {
        path: 'nbncIndex',
        component: () => import('../views/Nbnc/NbncIndex.vue'),
        children: [
          {
            path: 'dog',
            component: () => import('../views/Nbnc/Dog.vue'),
          },
          {
            path: 'cat',
            component: () => import('../views/Nbnc/Cat.vue'),
          },
          {
            path: '/nbncIndex',
            redirect: "/nbncIndex/dog",
          },
        ]
      },
      {
        path: 'list',
        component: () => import('../views/Nbnc/List.vue'),
      },
      {
        path: '/nbnc',
        redirect: "/nbnc/nbncIndex",
      },
    ]
  },
  {
    path: '/askList',
    component: () => import('../views/AskList.vue'),
  },
  {
    path: '/shop',
    children: [
      {
        path: 'shop',
        component: () => import('../views/Shop/Shop.vue'),
      },
      {
        path: 'cart',
        component: () => import('../views/Shop/Cart.vue'),
        meta: {
          isLogin: true,
        },
      },
      {
        path: 'pay',
        component: () => import('../views/Shop/Pay.vue'),
        // 路由元信息  额外给路由添加的标识，可以通过$router访问到
        meta: {
          isLogin: true,
        },
      },
      {
        path: 'product',
        component: () => import('../views/Shop/Product.vue'),
      },
      {
        path: 'category',
        children: [
          {
            path: '',
            component: () => import('../views/Shop/Category.vue'),
          },
          {
            path: 'all',
            component: () => import('../views/Shop/All.vue'),
          }
        ]
      },
      {
        path: '/address',
        meta: {
          isLogin: true,
        },
        children: [
          {
            path: 'list',
            component: () => import('../views/Address/List.vue'),


          },
          {
            path: 'edit',
            component: () => import('../views/Address/Edit.vue'),
          },
          {
            path: 'region',
            component: () => import('../views/Address/Region.vue'),
          },
          {
            path: '/address',
            redirect: "/address/list",
          },
        ]

      },
      {
        path: '',
        component: () => import('../views/Shop/Shop.vue'),
      },
    ]
  },
]